<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>1.关于props传值属性的问题</title>
    <script src="../public/vue2.7.14-dev.js"></script>
  </head>
  <body>
    <div id="app">
      <p>{{a}}</p>
      <hii class="jjjj" gi="skdfjk" icon-class="hello" />
    </div>

    <script>
      const component = {
        template: "<h1>我就怕你了{{iconClass}}-<span>{{$attrs}}</span></h1>",
        props: {
          iconClass: {
            type: String,
          },
          className: {
            type: String,
            default: "",
          },
        },
      };

      new Vue({
        inheritAttrs:false,
        el: "#app",
        components: {
          hii: component,
        },
        data() {
          return {
            a: "hello",
          };
        },
      });
    </script>
  </body>
</html>
